<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Sets one or more options for connection</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.yaz-search.html">yaz_search</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.yaz-sort.html">yaz_sort</a></div>
 <div class="up"><a href="ref.yaz.html">YAZ 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.yaz-set-option" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">yaz_set_option</h1>
  <p class="verinfo">(PECL yaz &gt;= 0.9.0)</p><p class="refpurpose"><span class="refname">yaz_set_option</span> &mdash; <span class="dc-title">Sets one or more options for connection</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.yaz-set-option-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>yaz_set_option</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$id</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
   )</div>

  <div class="methodsynopsis dc-description">
   <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>yaz_set_option</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$id</code></span>
   , <span class="methodparam"><span class="type">array</span> <code class="parameter">$options</code></span>
   )</div>

  <p class="para rdfs-comment">
   Sets one or more options on the given connection.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.yaz-set-option-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">id</code></em></dt>

     <dd>

      <p class="para">
       The connection resource returned by <span class="function"><a href="function.yaz-connect.html" class="function">yaz_connect()</a></span>.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">name</code></em> or <em><code class="parameter">options</code></em></dt>

     <dd>

      <p class="para">
       May be either a string or an array.
      </p>
      <p class="para">
       If given as a string, this will be the name of the option to set. You&#039;ll
       need to give it&#039;s <em><code class="parameter">value</code></em>.
      </p>
      <p class="para">
       If given as an array, this will be an associative array (option name 
       =&gt; option value).
      </p>
      <table class="doctable table">
       <caption><strong>PHP/YAZ Connection Options</strong></caption>
       
        <col width="2*" />
        <col width="5*" />
        <thead>
         <tr>
          <th>Name</th>
          <th>Description</th>
         </tr>

        </thead>

        <tbody class="tbody">
         <tr>
          <td>implementationName</td>
          <td>implementation name of server</td>
         </tr>

         <tr>
          <td>implementationVersion</td>
          <td>implementation version of server</td>
         </tr>

         <tr>
          <td>implementationId</td>
          <td>implementation ID of server</td>
         </tr>

         <tr>
          <td>schema</td>
          <td>
           schema for retrieval. By default, no schema is used. Setting this
           option is equivalent to using function 
           <span class="function"><a href="function.yaz-schema.html" class="function">yaz_schema()</a></span>
          </td>
         </tr>

         <tr>
          <td>preferredRecordSyntax</td>
          <td>
           record syntax for retrieval. By default, no syntax is used. Setting
           this option is equivalent to using function 
           <span class="function"><a href="function.yaz-syntax.html" class="function">yaz_syntax()</a></span>
          </td>
         </tr>

         <tr>
          <td>start</td>
          <td>
           offset for first record to be retrieved via 
           <span class="function"><a href="function.yaz-search.html" class="function">yaz_search()</a></span> or <span class="function"><a href="function.yaz-present.html" class="function">yaz_present()</a></span>.
           First record is numbered has a start value of 0. Second record has
           start value 1.
           Setting this option in combination with option
           <em>count</em> has the same effect as calling
           <span class="function"><a href="function.yaz-range.html" class="function">yaz_range()</a></span> except that records are
           numbered from 1 in <span class="function"><a href="function.yaz-range.html" class="function">yaz_range()</a></span>
          </td>
         </tr>

         <tr>
          <td>count</td>
          <td>maximum number of records to be retrieved via
           <span class="function"><a href="function.yaz-search.html" class="function">yaz_search()</a></span> or <span class="function"><a href="function.yaz-present.html" class="function">yaz_present()</a></span>.
          </td>
         </tr>

         <tr>
          <td>elementSetName</td>
          <td>element-set-name for retrieval. Setting this option is
           equivalent to calling <span class="function"><a href="function.yaz-element.html" class="function">yaz_element()</a></span>.
          </td>
         </tr>

        </tbody>
       
      </table>

     </dd>

    
    
     <dt>
<em><code class="parameter">value</code></em></dt>

     <dd>

      <p class="para">
       The new value of the option. Use this only if the previous argument is
       a string.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.yaz-set-option-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.yaz-search.html">yaz_search</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.yaz-sort.html">yaz_sort</a></div>
 <div class="up"><a href="ref.yaz.html">YAZ 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
